/*     */ package com.hp.bon.sgw.scsp;
/*     */ 
/*     */ import java.io.UnsupportedEncodingException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Iterator;
/*     */ import java.util.List;
/*     */ import org.dom4j.Attribute;
/*     */ import org.dom4j.Element;
/*     */ 
/*     */ public class SCSPMessage
/*     */ {
/*  34 */   public static byte VERSION = 1;
/*     */   private boolean isParsed;
/*     */   private int length;
/*     */   private int resendTimes;
/*     */   private byte version;
/*     */   private String bodyStr;
/*     */   private Element element;
/*     */   private String formatBody;
/*     */   private byte[] bodyArray;
/*     */   public long _rt0;
/*     */   public long _st1;
/*     */   public long _st2;
/*     */   public long _st3;
/*     */   private int _retransmittingCounter;
/*     */   private HashMap<String, Object> propertiesMap;
/*     */   private Object _stateObject;
/*     */ 
/*     */   private SCSPMessage()
/*     */   {
/*     */   }
/*     */ 
/*     */   public SCSPMessage(String strBuf)
/*     */   {
/*  45 */     this.bodyStr = strBuf;
/*  46 */     this.isParsed = false;
/*     */   }
/*     */ 
/*     */   public SCSPMessage(Element root)
/*     */   {
/*  53 */     this.element = root;
/*  54 */     this.bodyStr = root.asXML();
/*  55 */     this.isParsed = true;
/*     */   }
/*     */   public int getLength() {
/*  58 */     return this.length;
/*     */   }
/*     */   public void setLength(int length) {
/*  61 */     this.length = length;
/*     */   }
/*     */   public byte getVersion() {
/*  64 */     return this.version;
/*     */   }
/*     */   public void setVersion(byte version) {
/*  67 */     this.version = version;
/*     */   }
/*     */   public String getBodyStr() {
/*  70 */     return this.bodyStr;
/*     */   }
/*     */   public void setBodyStr(String body) {
/*  73 */     this.bodyStr = body;
/*     */   }
/*     */ 
/*     */   public int getRetransmittingCounter()
/*     */   {
/*  94 */     return this._retransmittingCounter;
/*     */   }
/*     */   public boolean isParsed() {
/*  97 */     return this.isParsed;
/*     */   }
/*     */   public Element getElement() {
/* 100 */     return this.element;
/*     */   }
/*     */   public void setElement(Element element) {
/* 103 */     this.element = element;
/* 104 */     this.isParsed = true;
/*     */   }
/*     */ 
/*     */   public void parseElement() {
/* 108 */     for (Iterator localIterator = this.element.attributes().iterator(); localIterator.hasNext(); ) { Object o = localIterator.next();
/*     */ 
/* 110 */       Attribute a = (Attribute)o;
/* 111 */       this.propertiesMap.put(a.getName(), a.getValue());
/*     */     }
/*     */   }
/*     */ 
/*     */   public byte[] getBodyArray()
/*     */   {
/* 117 */     return this.bodyArray;
/*     */   }
/*     */   public void setBodyArray(byte[] bodyArray) {
/* 120 */     this.bodyArray = bodyArray;
/*     */   }
/*     */   public String getFormatBody() {
/* 123 */     return this.formatBody;
/*     */   }
/*     */   public void setFormatBody(String formatBody) {
/* 126 */     this.formatBody = formatBody;
/*     */   }
/*     */ 
/*     */   public void serialize() {
/*     */     try {
/* 131 */       this.bodyArray = getBodyStr().getBytes("UTF-8");
/* 132 */       this.length = (this.bodyArray.length + 8);
/*     */     }
/*     */     catch (UnsupportedEncodingException e) {
/* 135 */       e.printStackTrace();
/*     */     }
/*     */   }
/*     */ 
/*     */   public Object getStateObject()
/*     */   {
/* 143 */     return this._stateObject;
/*     */   }
/*     */ 
/*     */   public void setStateObject(Object stateObject)
/*     */   {
/* 148 */     this._stateObject = stateObject;
/*     */   }
/*     */   public int getResendTimes() {
/* 151 */     return this.resendTimes;
/*     */   }
/*     */   public void setResendTimes(int resendTimes) {
/* 154 */     this.resendTimes = resendTimes;
/*     */   }
/*     */ }

/* Location:           C:\Users\think\Desktop\sgw_2.1.jar
 * Qualified Name:     com.hp.bon.sgw.scsp.SCSPMessage
 * JD-Core Version:    0.6.1
 */